Next:
exit() & atexit() [system call]
, Previous:
Progress of Process(from fork to exit)
, Up:
Index
tmpfile() [system call]
#include
<stdio.h>
FILE
*
tmpfile
(
void
)
;
example
#include
<stdio.h>
FILE
*
stream
;
char
tmpstring
[
]
=
"
This is the string to be temporarily written
"
;
int
main
(
void
)
{
if
((
stream
=
tmpfile
(
))
==
NULL
)
perror
(
"
Cannot make a temporary file
"
)
;
else
fprintf
(
stream
,
"
%s
"
,
tmpstring
)
;
}